package net.hn.hnms.biz.support.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.hn.hnms.biz.support.service.RoofService;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.sys.common.satoken.config.AutoSetMineCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 综合概览得controller层，写一些首页需要的接口
 */
@Api(value = "综合概览-顶板接口", tags = {"综合概览首页顶板部分接口"})
@RestController
@RequestMapping("roofSupportIndex")
public class RoofIndexController {

    //cjdy服务
    @Resource
    private RoofService roofService;

    @ApiOperation("安全综合概览-冲击地压onLine、max、min")
    @GetMapping("/cjdy/extremum")
    @AutoSetMineCode
    public R<Map<String,Number>> extremum(@ApiParam(value = "煤矿编码") String mineCode,
                                         @ApiParam(value = "冲击地压类型:support-支架，abscission-离层，anchor-锚杆所") String type) {
        Map<String,Number> map = roofService.extremum(type, mineCode);
        return R.ok(map);

    }
}
